/**
 *
 */
package com.angel.mocks.daos.impl;

import java.io.Serializable;
import java.util.Collection;

import org.hibernate.criterion.Restrictions;

import com.angel.dao.generic.impl.GenericHibernateDAO;
import com.angel.mocks.dao.generic.Person;
import com.angel.mocks.daos.PersonDAO;

/**
 * @author William
 *
 */
public class PersonDAOHibernate extends GenericHibernateDAO<Person, Serializable> implements PersonDAO{


	public Collection<Person> findAllByAge(Integer age) {
		return super.findAllByCriteria(Restrictions.eq("age", age));
	}


	public Collection<Person> findAllByName(String name) {
		return super.findAllByCriteria(Restrictions.eq("name", name));
	}


}
